home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 2027 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.1 KB

  1. Path: Flex058.dBH.WAU.NL!joop.vandeWege
  2. From: joop.vandeWege@medew.ento.wau.nl (Joop van de Wege)
  3. Newsgroups: comp.sys.amiga.programmer,comp.sys.amiga.games,comp.sys.amiga.hardware,comp.sys.amiga.misc,comp.sys.amiga.graphics
  4. Subject: Re: FPU and games?
  5. Date: Fri, 26 Jan 1996 11:41:10 LOCAL
  6. Organization: ento
  7. Message-ID: <joop.vandeWege.536.002C49EF@medew.ento.wau.nl>
  8. References: <38232041@kone.fipnet.fi> <volker.0ed8@vb.franken.de> <38232075@kone.fipnet.fi> <volker.0ehd@vb.franken.de> <38232112@kone.fipnet.fi> <volker.0en5@vb.franken.de> <38232154@kone.fipnet.fi> <wfblanDLozuJ.64s@netcom.com>
  9. NNTP-Posting-Host: flex058.dbh.wau.nl
  10. X-Newsreader: Trumpet for Windows [Version 1.0 Rev B final beta #4]
  11.  
  12. In article <wfblanDLozuJ.64s@netcom.com> wfblan@netcom.com (Wells Fargo Bank) writes:
  13. >From: wfblan@netcom.com (Wells Fargo Bank)
  14. >Subject: Re: FPU and games?
  15. >Date: Wed, 24 Jan 1996 15:47:07 GMT
  16.  
  17. >Jyrki Saarinen (jsaarinen@kone.fipnet.fi) wrote:
  18.  
  19. >: > It is. fmove.l fpx,dy converts an 80bit floating point number to a
  20. >: > 32bit signed integer.
  21.  
  22. >: Ok, great. I stupidly thought that fint is needed when it was
  23. >: not. 
  24.  
  25. >: Now, I can see how FPU can be used in perspective correct
  26. >: texture mapping. Everything could be fitted into registers..
  27.  
  28. >: Hmm. I tested a loop like this:
  29.  
  30. >:       fmove   fp2,fp6         ;v<<8/z
  31. >:       fmove   fp0,fp7         ;u/z
  32. >:       fdiv    fp4,fp6         ;v<<8 = v<<8/z / 1/z
  33. >:       fdiv    fp4,fp7         ;u = u/z / 1/z
  34. >:       fmove.l fp6,d0
  35. >:       fmove.b fp7,d0
  36. >:       move.b  (a0,d0.l),(a1)+
  37. >:       fadd    fp2,fp3         ;v/z+=v/z step
  38. >:       fadd    fp0,fp1         ;u/z+=u/z step
  39. >:       fadd    fp5,fp4         ;1/z+=1/z step
  40.  
  41. >: Now, with those fmoves to data registers this loop
  42. >: was very slow. Any reason why? Without those fmoves
  43. >: this loop was about the clock cycles the 040 manual
  44. >: tells.
  45.  
  46. Check out the mc68030 reference manual, the pages about differences between 
  47. 882/1 and implement the suggestion found there.
  48. Basically you should try to avoid using the same instruction twice in a row. 
  49. It is better to mix fmove with something else to get the most out of 
  50. the pipeline decoding.
  51.  
  52. Joop
  53.  
  54.